package com.settlement.system.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.settlement.system.common.result.PageResult;
import com.settlement.system.model.entity.DyOrder;
import com.settlement.system.model.query.DyOrderPageQuery;
import com.settlement.system.service.DyOrderService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 抖音订单 前端控制器
 * </p>
 *
 * @author huangrensen
 * @since 2023-08-05
 */
@Tag(name = "抖音订单")
@RestController
@RequestMapping("/api/v1/dyOrder")
@RequiredArgsConstructor
public class DyOrderController {

    private final DyOrderService dyOrderService;

    @Operation(summary = "抖音原始账单分页列表", security = {@SecurityRequirement(name = "Authorization")})
    @GetMapping("/page")
    public PageResult<DyOrder> getBillPage(@ParameterObject DyOrderPageQuery queryParams) {
        Page<DyOrder> result = dyOrderService.getDyOrderPage(queryParams);
        return PageResult.success(result);
    }
}
